<template>
  <div id="app">
    <Table>
      <template v-slot:thead>
        <tr>
          <th>编号</th>
          <th>类别</th>
          <th>数量</th>
        </tr>
      </template>
      <template v-slot:tbody>
        <tr v-for="(value,index) of array" :key="index">
          <td>{{value.num}}</td>
          <td>{{value.name}}</td>
          <td>{{value.dj}}</td>
        </tr>
      </template>
    </Table>
  </div>
</template>

<script>
import Table from "./components/Table";
export default {
  components:{
    Table
  },
  data(){
    return{
      array:[
      {num:1,name:"苹果",dj:2.5},
      {num:2,name:"鸭梨",dj:6.5},
      {num:3,name:"香蕉",dj:4.5},
      {num:4,name:"葡萄",dj:5}
      ],
    }
  }
}  
</script>
<style> 
</style>
